import store from "@/store";
import dayjs from "dayjs";
console.log(88);
export const formItemStyle = {
  paddingLeft: "20px",
};

export const cellStyle = {
  background: "rgba(28, 155, 252, 0.02)",
  color: "rgb(142, 155, 185)",
  textAlign: "center",
};

// 表头单元格样式
export const headerCellStyle = {
  background: "rgba(28, 155, 252, 0.02)",
  color: "rgb(142, 155, 185)",
  textAlign: "center",
};

// 表格内表单子样式
export const tableFormStyle = {
  marginBottom: 0,
};

export const formBase = [
  {
    label: "打包时间",
    type: "daterange",
    field: "shelfTime",
    prop: "shelfTime",
    required: true,
    otherOptions: {
      disabled: false,
      rangeSeparator: "至",
      startPlaceholder: "开始日期",
      endPlaceholder: "结束日期",
      pickerOptions: {
        shortcuts: [
          {
            text: "今天",
            onClick(picker) {
              const end = dayjs().format("YYYY-MM-DD 23:59:59");
              const start = dayjs().format("YYYY-MM-DD 00:00:00");
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "昨天",
            onClick(picker) {
              const end = new Date(dayjs().format("YYYY-MM-DD 23:59:59"));
              const start = new Date(dayjs().format("YYYY-MM-DD 00:00:00"));
              end.setTime(start.getTime() - 3600 * 1000 * 24);
              start.setTime(start.getTime() - 3600 * 1000 * 24);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近三天",
            onClick(picker) {
              const end = new Date(dayjs().format("YYYY-MM-DD 23:59:59"));
              const start = new Date(dayjs().format("YYYY-MM-DD 00:00:00"));
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 3);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近一周",
            onClick(picker) {
              const end = new Date(dayjs().format("YYYY-MM-DD 23:59:59"));
              const start = new Date(dayjs().format("YYYY-MM-DD 00:00:00"));
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近一个月",
            onClick(picker) {
              const end = new Date(dayjs().format("YYYY-MM-DD 23:59:59"));
              const start = new Date(dayjs().format("YYYY-MM-DD 00:00:00"));
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit("pick", [start, end]);
            },
          },
        ],
      },
    },
  },
  {
    label: "装袋", //1=已装袋，2=未装袋
    type: "select",
    field: "baggingStatus",
    optionsKey: "label",
    optionsValue: "value",
    options: [
      {
        label: "已装袋",
        value: 1,
      },
      {
        label: "未装袋",
        value: 2,
      },
    ],
  },
  {
    label: "货物类别",
    type: "select",
    field: "cargoCategory",
    optionsKey: "cargoName",
    optionsValue: "id",
    options: store.state.custom_dict.category,
  },
  {
    label: "承运商",
    type: "select",
    required: true,
    field: "carrier",
    optionsKey: "carrierName",
    optionsValue: "id",
    options: store.state.custom_dict.carrier,
  },
  {
    label: "国内快递单号",
    type: "input",
    field: "courierNo",
  },
  {
    label: "清关公司",
    type: "select",
    field: "customsClearanceCompany",
    optionsKey: "customsName",
    optionsValue: "id",
    options: [],
  },
  {
    label: "清关单号",
    type: "input",
    field: "customsClearanceNo",
  },
  {
    label: "发车编号",
    type: "input",
    field: "dispatchingNo",
  },
  {
    label: "装车", //1=是,2=否
    type: "select",
    field: "loading",
    optionsKey: "label",
    optionsValue: "value",
    options: [
      {
        label: "已装车",
        value: 1,
      },
      {
        label: "未装车",
        value: 2,
      },
    ],
  },
  {
    label: "会员名称",
    type: "input",
    field: "memberName",
  },
  {
    label: "运单号",
    type: "input",
    field: "shippingNo",
  },
  {
    label: "仓库",
    type: "select",
    field: "warehouse",
    optionsKey: "warehouseName",
    optionsValue: "id",
    options: store.state.custom_dict.warehouse,
  },
  {
    label: "店铺",
    type: "select",
    field: "storeName",
    optionsKey: "shopName",
    optionsValue: "id",
    options: store.state.custom_dict.shop,
  },
  {
    label: "重量",
    type: "input",
    field: "weight",
  },
];

export const tableBase = [
  {
    label: "清关单号",
    prop: "customsClearanceNo",
    width: "200",
  },
  {
    label: "提单号",
    prop: "deliveryReceiptNo",
    width: "200",
  },
  {
    label: "快递件数",
    prop: "expressPackageCount",
    width: "200",
  },
  {
    label: "票重",
    prop: "ticketWeight",
    width: "200",
  },
  {
    label: "货物类别",
    prop: "cargoCategory",
    width: "200",
  },
  {
    label: "转运单号",
    prop: "orderNo",
    width: "200",
  },
  {
    label: "件数",
    prop: "itemCount",
    width: "200",
  },
  {
    label: "是否包税",
    prop: "isTaxed",
    width: "200",
    operate: {
      type: "switch",
      field: "isTaxed",
      otherOptions: {
        activeValue: 1,
        inactiveValue: 0,
      },
    },
  },
  {
    label: "清关状态",
    prop: "clearanceStatus",
    width: "200",
  },
  {
    label: "航班状态",
    prop: "flightStatus",
    width: "200",
  },
  {
    label: "清关袋重",
    prop: "clearanceBagWeight",
    width: "200",
  },
  {
    label: "派件状态",
    prop: "deliveryStatus",
    width: "200",
  },
  {
    label: "会员名称",
    prop: "memberName",
    width: "200",
  },
  {
    label: "当前仓",
    prop: "currentWarehouse",
    width: "200",
  },
  {
    label: "总费用",
    prop: "totalFee",
    width: "200",
  },
  {
    label: "付款方式",
    prop: "paymentMethod",
    width: "200",
  },
  {
    label: "运输方式",
    prop: "transportationMode",
    width: "200",
  },
  {
    label: "服务方式",
    prop: "serviceMethod",
    width: "200",
  },
  {
    label: "航空时效",
    prop: "airTimeEfficiency",
    width: "200",
  },
  {
    label: "同行备注",
    prop: "notesForColleagues",
    width: "200",
  },
  {
    label: "转运单号",
    prop: "transferOrderNo",
    width: "200",
  },
  {
    label: "转单号品名",
    prop: "transferOrderItemName",
    width: "200",
  },
  {
    label: "订单品名",
    prop: "orderItemName",
    width: "200",
  },
  {
    label: "转单号重量",
    prop: "weightOfTransferOrder",
    width: "200",
  },
  {
    label: "店铺名称",
    prop: "storeName",
    width: "200",
  },
  {
    label: "店铺ID",
    prop: "shoppingId",
    width: "200",
  },
  {
    label: "目的地",
    prop: "destination",
    width: "200",
  },
  {
    label: "报关公司",
    prop: "customsBrokerageCompany",
    width: "200",
  },
  {
    label: "会员ID",
    prop: "memberId",
    width: "200",
  },
  {
    label: "收件人姓名",
    prop: "recipientName",
    width: "200",
  },
  {
    label: "收件人地址",
    prop: "recipientAddress",
    width: "200",
  },
  {
    label: "收件人电话",
    prop: "recipientPhone",
    width: "200",
  },
  {
    label: "收件人统编",
    prop: "recipientCode",
    width: "200",
  },
  {
    label: "代收金额",
    prop: "collectionAmount",
    width: "200",
  },
  {
    label: "承运商",
    prop: "carrier",
    width: "200",
  },
  {
    label: "承运商客代",
    prop: "carrierCustomerAgent",
    width: "200",
  },
  {
    label: "清关公司",
    prop: "customsClearanceCompany",
    width: "200",
  },
  {
    label: "清关派件公司",
    prop: "deliveryAndPickupCompany",
    width: "200",
  },
  {
    label: "快递单号",
    prop: "expressDeliveryNo",
    width: "200",
  },
  {
    label: "仓储公司",
    prop: "storageCompany",
    width: "200",
  },
  {
    label: "装袋时间",
    prop: "baggingTime",
    slotName: "baggingTime",
    width: "200",
  },
  {
    label: "备注",
    prop: "remarks",
    width: "200",
  },
  {
    label: "订单时间",
    prop: "orderTime",
    slotName: "orderTime",
    width: "200",
  },
  {
    label: "打单时间",
    prop: "printingTime",
    slotName: "printingTime",
    width: "200",
  },
  {
    label: "装车时间",
    prop: "loadingTime",
    slotName: "loadingTime",
    width: "200",
  },
  {
    label: "发车编号",
    prop: "dispatchingNo",
    width: "200",
  },
  {
    label: "长",
    prop: "lengths",
    width: "200",
  },
  {
    label: "宽",
    prop: "widths",
    width: "200",
  },
  {
    label: "高",
    prop: "heights",
    width: "200",
  },
  {
    label: "业务员",
    prop: "salesman",
    width: "200",
  },
  {
    label: "快递单号列表",
    prop: "trackingOrderItemList",
    width: "200",
  },
  {
    label: "快递单号品名",
    prop: "trackingOrderItemName",
    width: "200",
  },
  {
    label: "快递单号尺寸",
    prop: "trackingOrderItemSize",
    width: "200",
  },
  {
    label: "快递单号重量",
    prop: "trackingOrderItemWeight",
    width: "200",
  },
  {
    label: "快递单号数量",
    prop: "trackingOrderItemNum",
    width: "200",
  },
  {
    label: "快递单号",
    prop: "courierNumber1",
    width: "200",
  },
  {
    label: "商品名称",
    prop: "cargoName",
    width: "200",
  },
  {
    label: "商品重量",
    prop: "weight",
    width: "200",
  },
  {
    label: "商品数量",
    prop: "number",
    width: "200",
  },
];
